package com.tinysand.advert.support;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 广告系统的面向前端的统一响应数据（格式）对象
 *
 * Created By TINY
 * Create Time 2020/2/14
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResponse<T> implements Serializable {

    /* 自定义响应码 */
    private Integer code;

    /* 响应信息 */
    private String message;

    /* 响应数据 */
    private T data;

    public CommonResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
